package bbs.entity.enums;

public enum TongyiTypeEnum {

//    文章总结
    SUMMARIZE(0, "summarize"),
//    文章润色
    OPTIMIZE(1, "optimize");

    private Integer type;
    private String desc;

    private TongyiTypeEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }
    public Integer getType() {
        return type;
    }
    public String getDesc() {
        return desc;
    }
    public static TongyiTypeEnum getType(Integer type) {
        for (TongyiTypeEnum e : TongyiTypeEnum.values()) {
            if (e.getType().equals(type)) {
                return e;
            }
        }
        return null;
    }
    public static String getDesc(String desc) {
        for (TongyiTypeEnum e : TongyiTypeEnum.values()) {
            if (e.getDesc().equals(desc)) {
                return e.getDesc();
            }
        }
        return null;
    }
}
